Port to GLnxTmpfile
authorColin Walters <walters@verbum.org>
Sat, 24 Jun 2017 14:06:53 +0000 (14:06 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 27 Jun 2017 22:02:14 +0000 (22:02 +0000)
commit5776d5dcc09e5aabae1b5c1b8854c0b66522accd
tree466c0a17f2c0378d4ff938078718dc17c0d50396
parent79f285d188eef288cecb35ed7977bf6e219cc396
Port to GLnxTmpfile

There's lots of mechanically replacing `OtTmpFile` with `GLnxTmpfile`;
the biggest changes are in the commit path.  Symlink commits are now
very clearly separated from regular files.  Symlinks are `OtCleanupUnlinkat`,
and regular files are `GLnxTmpfile`.

The commit codepath separates those as `_ostree_repo_commit_path_final()` and
`_ostree_repo_commit_tmpf_final()`. A nice aspect of all of this is that they
both *consume* the temporary on success. This avoids an extra spurious
`unlink()` call.

One of the biggest bits of code motion is in `commit_loose_regfile_object()`,
which no longer needs to care about symlinks. For the most parth though it's
just removing conditionals.

Update submodule: libglnx

Closes: #958
Approved by: jlebon
13 files changed:
libglnx
src/libostree/ostree-fetcher-curl.c
src/libostree/ostree-impl-system-generator.c
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-pull.c
src/libostree/ostree-repo-static-delta-compilation.c
src/libostree/ostree-repo-static-delta-processing.c
src/libostree/ostree-repo.c
src/libotutil/ot-fs-utils.c
src/libotutil/ot-fs-utils.h
src/ostree/ot-remote-cookie-util.c